package com.springboot.controller;

import com.springboot.dto.PatientOrderInfo;
import com.springboot.service.SuccessOrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SuccessOrderInfoController {
    @Autowired
    SuccessOrderInfoService successOrderInfoService;

    /**
     * //患者点击某次预约时，返回预约信息
     * @param bookId
     * @return

     * @date 2020-12-20
     */
    @CrossOrigin
    @RequestMapping(value = "/successOrderInfo")
    public @ResponseBody
    PatientOrderInfo successOrderInfo(@RequestParam("bookId") Integer bookId)
    {
        return successOrderInfoService.showPatientOrderInfo(bookId);
    }
}
